﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Pay1
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
            comboBoxZhangTao.Text = "JJ账套";
            txtUser.Text = "JessyJialiana";
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtUser.Text == "JessyJialiana" && txtKey.Text == "12345")
            {
                this.Close();
                this.DialogResult = DialogResult.OK;
            } 
            else
            {
                comboBoxZhangTao.Text = "JJ账套";
                txtUser.Text = "JessyJialiana";
                txtKey.Text = "";
                labeltip.Text = "密码错误，请重新输入密码";
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
            Application.Exit();
        }

        private void Login_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Close();
        }
    }
}
